import preprocess from 'svelte-preprocess';
import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';
import {
	resolve
} from 'path'

/** @type {import('@sveltejs/kit').Config} */
const config = {
	// Consult https://github.com/sveltejs/svelte-preprocess
	// for more information about preprocessors
	preprocess: preprocess({
		postcss: {
			plugins: [
				tailwindcss,
				autoprefixer,
			],
		},
	}),

	kit: {
		// hydrate the <div id="svelte"> element in src/app.html
		target: '#app',
		vite: {
			resolve: {
				alias: {
					$store: resolve('./src/store')
				}
			}
		}
	}
};

export default config;